/*
 * Class: ItemUtil
 * 
 * Created on Sep 16, 2013
 * 
 * (c) Copyright by Minh Tran
 * Global Cybersoft VN.
 * Floor 3-4-5, Helios Building, Quang Trung Software City
 */
package com.minh.tran.util;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import java.util.logging.Logger;

import com.minh.tran.model.Gold;

public class ItemUtil
{

    /** The Constant CHAR_OPEN. */
    public static final String CHAR_OPEN = "[";

    /** The Constant CHAR_CLOSE. */
    public static final String CHAR_CLOSE = "]";

    /** The Constant GOLD. */
    public static final String GOLD = "Gold";

    /**
     * Gets the logger.
     *
     * @param abstractWebservice the abstract webservice
     * @return the logger
     */
    public static Logger getLogger(Class<?> aClass)
    {
        return Logger.getLogger(aClass.getName());
    }

    /**
     * Write file.
     *
     * @param content the content
     */
    public static void writeFile(final String content)
    {
        try
        {
            final File file = new File("/catch.txt");
            if (!file.exists())
            {
                file.createNewFile();
            }
            final FileWriter fw = new FileWriter(file.getAbsoluteFile());
            final BufferedWriter bw = new BufferedWriter(fw);
            bw.append(content);
            // bw.write(content);
            bw.close();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    /**
     * Read file.
     */
    public static void readFile(final List<Gold> lstGolds)
    {

    }
}
